/********************************************************************
  Copyright by PCI, 2002-10-08
  File Name: db_ppm_rule.cxx
  Created Date: 2002-10-08 
  Author: Machine
  Version: 1.0 
  Last Version Date: 
  Version Date:
*******************************************************************/
/********************************************************************
  Copyright by PCI, 2002-10-08
  Class Name: CTable_PPM_RULE
  Created Date: 2002-10-08 
  Author: Machine
  Defined File: db_ppm_rule.hxx
  Last Version Date: 
  Version Date:
*******************************************************************/
#include "table_ppm.h" 


CTable_PPM_RULE::CTable_PPM_RULE( )
 :NPCRecordSet( )
{
  setTableName( "PPM_RULE" );
  prepareTable();
  prepareQuery();
 
  RULE_ID.setField( "RULE_ID", DATA_DOUBLE, 22, 1 );
  makeTableItem( RULE_ID );
  makeKeyItem( RULE_ID ); 
  RULE_NAME.setField( "RULE_NAME", DATA_CHAR, 50, 0 );
  makeTableItem( RULE_NAME );
  COMMENTS.setField( "COMMENTS", DATA_CHAR, 256, 0 );
  makeTableItem( COMMENTS );
  RULE_TYPE.setField( "RULE_TYPE", DATA_CHAR, 3, 0 );
  makeTableItem( RULE_TYPE );
  DATA.setField( "DATA", DATA_CHAR, 256, 0 );
  makeTableItem( DATA );
  STATE.setField( "STATE", DATA_CHAR, 3, 0 );
  makeTableItem( STATE );
  STATE_DATE.setField( "STATE_DATE", DATA_DATETIME, 7, 0 );
  makeTableItem( STATE_DATE );
  CREATE_PERSON.setField( "CREATE_PERSON", DATA_CHAR, 50, 0 );
  makeTableItem( CREATE_PERSON );
  CREATE_DATE.setField( "CREATE_DATE", DATA_DATETIME, 7, 0 );
  makeTableItem( CREATE_DATE );
  RULE_LEVEL.setField( "RULE_LEVEL", DATA_DOUBLE, 22, 0 );
  makeTableItem( RULE_LEVEL );
  RULE_DETIALS.setField( "RULE_DETIALS", DATA_CHAR, 1024, 0 );
  makeTableItem( RULE_DETIALS );
}


CTable_PPM_RULE::CTable_PPM_RULE( NPConnection& pcldb )
 :NPCRecordSet( pcldb )
{
  setTableName( "PPM_RULE" );
  prepareTable();
  prepareQuery();
 
  RULE_ID.setField( "RULE_ID", DATA_DOUBLE, 22, 1 );
  makeTableItem( RULE_ID );
  makeKeyItem( RULE_ID ); 
  RULE_NAME.setField( "RULE_NAME", DATA_CHAR, 50, 0 );
  makeTableItem( RULE_NAME );
  COMMENTS.setField( "COMMENTS", DATA_CHAR, 256, 0 );
  makeTableItem( COMMENTS );
  RULE_TYPE.setField( "RULE_TYPE", DATA_CHAR, 3, 0 );
  makeTableItem( RULE_TYPE );
  DATA.setField( "DATA", DATA_CHAR, 256, 0 );
  makeTableItem( DATA );
  STATE.setField( "STATE", DATA_CHAR, 3, 0 );
  makeTableItem( STATE );
  STATE_DATE.setField( "STATE_DATE", DATA_DATETIME, 7, 0 );
  makeTableItem( STATE_DATE );
  CREATE_PERSON.setField( "CREATE_PERSON", DATA_CHAR, 50, 0 );
  makeTableItem( CREATE_PERSON );
  CREATE_DATE.setField( "CREATE_DATE", DATA_DATETIME, 7, 0 );
  makeTableItem( CREATE_DATE );
  RULE_LEVEL.setField( "RULE_LEVEL", DATA_DOUBLE, 22, 0 );
  makeTableItem( RULE_LEVEL );
  RULE_DETIALS.setField( "RULE_DETIALS", DATA_CHAR, 1024, 0 );
  makeTableItem( RULE_DETIALS );
}

CTable_PPM_RULE::~CTable_PPM_RULE( )
{
    close();
}

